{if !$tree and !$case and !$device and !$disk and !$partition}
	<div id="case-tree-box">
		<div class="header">Navigation<div title="Refresh" class="headerbutton reftree" onclick="casetree();"></div></div>
		<div id="casetree"></div>
	</div>
	<div id="case-info-box">
			<div class="header">Info</div>
			<div id="caseinfo"></div>
	</div>
	<script type="text/javascript" class="source">casetree();</script>
{/if}

{if $tree}
	{if $items}
		{if not $base}
		<li class="open" rel="cases"><a href="#">Cases</a><ul>
		{/if}
		{foreach name=i item=i from=$items}
			<li {if $type != "partition"}class="closed"{/if} rel="{$type}"><a href="#"><ins>&nbsp;</ins>{$i.name}</a></li>
		{/foreach}
		{if not $base}
			</ul></li>
		{/if}
	{/if}
{/if}

{if $case}
	<form id="case-form" action="">
	<input id="mod" type="hidden" name="mod" value="caseinfo"/>
	<label for="case">Caso:</label> <input id="case" type="text" name="case" value="{$case.name}"/><br/>
	<label for="code">Clave:</label> <input id="code" type="text" name="code" value="{$case.code}"/><br/>
	<label for="desc">Descripción:</label><br/>
	<textarea id="desc" name="desc" />{$case.desc}</textarea><br/>
	<label>Dispositivos:</label><br/>
	<ul>
	{foreach name=dev item=dev from=$devices}
		<li><a href="#">{$dev.name}</a> {if $dev.desc}({$dev.desc}){/if}</li>
	{/foreach}
	</ul>
	</form>
{/if}

{if $device}
	<form id="case-form" action="">
	<input id="mod" type="hidden" name="mod" value="caseinfo"/>
	<label for="device">Dispositivo:</label> <input id="device" type="text" name="device" value="{$device.name}"/><br/>
	<label for="desc">Descripción:</label><br/>
	<textarea id="desc" name="desc" />{$device.desc}</textarea><br/>
	<label>Discos:</label><br/>
	<ul>
	{foreach name=dsk item=dsk from=$disks}
		<li><a href="#">{$dsk.name}</a> {if $dsk.desc}({$dsk.desc}){/if}</li>
	{/foreach}
	</ul>
	</form>
{/if}

{if $disk}
	<form id="case-form" action="">
	<input id="mod" type="hidden" name="mod" value="caseinfo"/>
	<label for="disk">Disco:</label> <input id="disk" type="text" name="disk" value="{$disk.name}"/><br/>
	<label for="origin">Origen:</label> <input id="origin" type="text" name="origin" value="{$disk.image}"/><br/>
	<label for="desc">Descripción:</label><br/>
	<textarea id="desc" name="desc" />{$disk.desc}</textarea><br/>
	<label>Particiones:</label><br/>
	<ul>
	{foreach name=part item=part from=$partitions}
		<li><a href="#">{$part.name}</a> [{$part.filesystem}] ({$part.size} bytes)</li>
	{/foreach}
	</ul>
	</form>
{/if}

{if $partition}
	<label>Partición:</label> {$partition.name}<br/><br/>
	<label>Tipo:</label> {$partition.type}<br/>
	<label>Tamaño:</label> {$partition.size}<br/>
	<label>Tam Bloque:</label> {$partition.clustersize}<br/>
	<label>Desplazamiento:</label> {$partition.obytes}<br/>
{/if}
